﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using ECI.CommonLibrary;
using System.Data;
using System.Web;
using ECI.Entities;
using ECI.Controls;
using ECI.CoreLibrary;
using ECI.WebLib.Data;

namespace ECI.DynamicData.ElementBuilder
{
    public class ElementFactory
    {
        public static  IElement  Create(string dataType)
        {
            IElement element = null;
            switch (dataType)
            {
                case "INPUT":
                case "INPUT_NUMBER":
                case "INPUT_INT": element = new TInput(); break;
                case "MEMO": element = new TMemo(); break;
                case "CHOOSE": element = new TChoose(); break;
                case "DATE":
                case "DATE_START":
                case "DATE_END": element = new TDate(); break;
                case "CHECK": element = new TCheckBox(); break;
                case "DROPDOWNLIST": element = new TDropdownList(); break;
                case "RADIONGROUP": element = new TRadionGroup(); break; 
               
            }
            return element;

        }
    }
}
